Improved Time and Space Complexities for Transposition Invariant String Matching
نویسندگان
چکیده
Given strings A = a1a2 . . . am and B = b1b2 . . . bn over a finite alphabet Σ ⊂ Z of size O(σ), and a distance d() defined among strings, the transposition invariant version of d() is d t(A,B) = mint∈Z d(A+t, B), where A+t = (a1+t)(a2+t) . . . (am+t). Distances d() of most interest are Levenshtein distance and indel distance (the dual of the Longest Common Subsequence), which can be computed in O(mn) time. Recent algorithms compute d t(A,B) in O(mn log logmin(m,n)) time for those distances. In this paper we show how those complexities can be reduced to O(mn log log σ). Furthermore, we reduce the space requirements from O(mn) to O(σ2 +min(m,n)).
منابع مشابه
Transposition invariant string matching
Given strings A = a1a2 . . . am and B = b1b2 . . . bn over an alphabet Σ ⊆ U, where U is some numerical universe closed under addition and subtraction, and a distance function d(A,B) that gives the score of the best (partial) matching of A and B, the transposition invariant distance is mint∈U{d(A+ t,B)}, where A+ t = (a1 + t)(a2 + t) . . . (am + t). We study the problem of computing the transpo...
متن کاملRestricted Transposition Invariant Approximate String Matching Under Edit Distance
Let A and B be strings with lengths m and n, respectively, over a finite integer alphabet. Two classic string mathing problems are computing the edit distance between A and B, and searching for approximate occurrences of A inside B. We consider the classic Levenshtein distance, but the discussion is applicable also to indel distance. A relatively new variant [8] of string matching, motivated in...
متن کاملSearching Monophonic Patterns within Polyphonic Sources
The string matching problem for strings in which one should find the occurrences of a pattern string within a text, is well-studied in the past literature. The problem can be solved efficiently, e.g., by using so-called bit-parallel algorithms. We adapt the bit-parallel approach to music information retrieval. We consider a situation where the pattern is monophonic and the text (the musical sou...
متن کاملTransposition Invariant Pattern Matching for Multi-Track Strings
We consider the problem of multi-track string matching. The task is to find the occurrences of a pattern across parallel strings. Given an alphabet Σ of natural numbers and a set S over Σ of h strings si = s1 · · · s i n for i = 1, . . . , h, a pattern p = p1 · · · pm has such an occurrence at position j of S if p1 = s i1 j , p2 = s i2 j+1, . . . , pm = s im j+m−1 holds for i1, . . . , im ∈ {1,...
متن کامل